/**
 * 判断参数是否为有效值
 * @param {any} value - 需要验证的值
 * @returns {boolean} - 是否为有效值
 */
function isValidValue(value) {
  const condition1 = value === null || value === undefined;
  const condition2 = typeof value === 'number' && isNaN(value);
  const condition3 = typeof value === 'string' && value.trim() === '';
  const condition4 = Array.isArray(value) && value.length === 0;
  const condition5 = typeof value === 'object' && !Array.isArray(value) && Object.keys(value).length === 0;

  if (condition1 || condition2 || condition3 || condition4 || condition5) {
    return false;
  }

  return true;
}

module.exports = {
  isValidValue
};